home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48hor2
/
pclprint.doc
< prev
next >
Wrap
Text File
|
1995-03-31
|
6KB
|
142 lines
PCLPRINT.DOC File
(c) Hewlett-Packard Company, 1990
OVERVIEW
--------
The PCLPRINT library enables you to print a graphics object on a PCL
[Hewlett-Packard Printer Command Language] printer, such as the HP
ThinkJet, HP DeskJet, and HP LaserJet printers.
[See EPSPRINT.LIB on this disk if you have an Epson printer or a
printer whose graphics "escape codes" are compatible with the Epson
command set. -jkh-]
When attached to the HOME directory, the library is named HPPRT. (An
{HPPRT} menu label is visible in the LIBRARY menu). Two commands in
the library, HPON and MAG, add an extra sublist of parameters as the
fifth element in the HP 48 reserved variable PRTPAR. These parameters
store information needed by your HP 48 to print graphics objects to
the PCL printer. In order of occurrence in the sublist, the
parameters are as follows:
o The real number 0, which indicates PCL printer type.
o A real number, which represents the magnification. This is
controlled by the MAG command and has a default setting of 2,
which tells the library to expand each pixel in the graphics
object to a 2x2 square on the printer.
o A string containing the escape sequence sent before a graphics
object is printed. The default begin sequence is "<esc>*r0A",
which tells the printer to start printing raster graphics at the
left margin. The only way to change this is to edit PRTPAR.
o A string containing the escape sequence sent after a graphics
object is printed. The default end sequence is
"<esc>*rB<cr><lf>", which tells the printer to end raster
graphics and execute a carriage-return and linefeed. The only
way to change this is to edit PRTPAR.
PROCEDURE
---------
Here are the steps to follow to transfer the Library into your
calculator and print an HP 48 graphics object on a PCL printer:
1. Transfer the PCLPRINT.LIB file from the computer to your
calculator. The menu label {PCLPR} will appear in your HP 48 VAR
menu.
2. Attach the library to your HOME directory:
A. Press the VAR menu label {PCLPR} to recall the library to
the stack.
B. Enter the port number where you want the library to
reside -- 0, 1, or 2.
C. Execute STO.
D. Turn the HP 48 off and then on again. {HPPRT} attaches
itself and appears as a library in the LIBRARY menu.
[E. Purge 'PCLPRINT' from your VAR menu; it's no longer useful
there. -jkh-]
3. Using the serial cable 25-pin adapter and a male-male gender
converter (not included), connect the HP 48 to the PCL printer.
4. Set the HP 48 baud (using the I/O SETUP menu) and the printer
baud to match each other. Set the printer to use XON/XOFF
handshaking. [The LaserJet Series II is set to Serial IO by
pressing OFFLINE, holding down MENU for five seconds until you
see SYM SET, press MENU twice, see I/O=PARALLEL *, press + and see
I/O=SERIAL, press ENTER and see I/O SERIAL *, press ONLINE.
-jkh-]
5. Execute HPON (press [left-shift][LIBRARY] {HPPRT} {HPON}). [Be
sure to execute HPOFF before removing PCLPRINT.LIB from memory!
-jkh-]
6. Optionally execute MAG and DPI. (See descriptions of these
commands below.)
7. Execute one of the HP 48 print commands for printing graphics
objects-- PRLCD, PR1, or PRVAR. ([ON][PRINT] does not work and
should be avoided.)
8. If you wish to switch back to printing on the HP 82240 Infrared
Printer, execute HPOFF (press [left-shift][LIBRARY] {HPPRT}
{HPOFF}). [Note: Be sure to execute HPOFF before removing this
library from memory! -jkh-]
COMMAND SUMMARY
---------------
These commands are contained in the PCL library:
o HPON: Enables special graphics printing and adds the previously
explained sublist to PRTPAR. Also sets flag -34 and clears flag
-33 so that printing is directed to the wired serial port, and
modifies IOPAR to enable transmit pacing (XON/XOFF) and to set
parity to "none."
o HPOFF: Disables special graphics printing and clears flag -34
(so that printing will be directed to an HP 82240B printer).
HPOFF does not change the sublist in PRTPAR--the magnification
setting and other changes are preserved for the next time you
execute HPON.
o MAG: Takes a real number from level 1 and puts it in the
magnification position in the sublist in PRTPAR. A magnification
of N causes one pixel in the graphics object to be expanded to an
NxN square on the printer. (MAG 0 effectively disables printing.)
o DPI: Takes a real number from level one and sends an escape
sequence to set the printer to that number of dots per inch.
This command only works for the HP DeskJet and HP LaserJet
printers. [75, 100, 150 and 300 are allowed. -jkh-]
[Note: changing the DPI does not affect printing speed; higher MAG
settings greatly slow down printing, however. Therefore, even though
300 DPI 4 MAG has the same printed result as 75 DPI 1 MAG, the latter
is 16 times faster! 100 DPI 2 MAG prints graphics approximately the
same size as the physical HP 48 display. -jkh-]
SPECIAL NOTE FOR THE HP LASERJET
--------------------------------
Since the HP LaserJet printer won't print until it gets a whole page
of data, you need to send a formfeed character (character number 12)
to print a graphics object of less than one page. You can do this by
putting a string containing a formfeed character in level 1 and
executing PR1. (You can also edit the sublist in PRTPAR so that the
end-sequence string contains a formfeed. This would cause each
graphics object to be printed on its own page.) [Or you can just
press OFFLINE FORMFEED ONLINE on your printer's panel. -jkh-]